<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./echatrs.main.js"></script>
</head>

<body>
    <div id="id" style="width: 600px;height: 500px;margin: auto;">
        <div id="main" style="width: 100%;height: 100%;"></div>
    </div>
</body>
<script>
    var app = {};

    var chartDom = document.getElementById('main');
    var myChart = echarts.init(chartDom);
    var option;
    option = {
        color:['#5d85e5','#7db9c3','#6aa264'],
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'shadow'
                }
            },
            legend: {
                data: ['C2109A', 'C2109B', 'C21010C']
            },
            toolbox: {
                show: true,
                orient: 'vertical',
                left: 'right',
                top: 'center',
            },
            xAxis: [{
                type: 'category',
                axisTick: { show: false },
                data: ['C2109班']
            }],
            yAxis: [{
                type: 'value'
            }],
            series: [{
                    name: 'C2109A',
                    type: 'bar',
                    barGap: 0,

                    emphasis: {
                        focus: 'series'
                    },
                    data: [320, 332, 301, 334, 390]
                },
                {
                    name: 'C2109B',
                    type: 'bar',

                    emphasis: {
                        focus: 'series'
                    },
                    data: [220, 182, 191, 234, 290]
                },
                {
                    name: 'C21010C',
                    type: 'bar',

                    emphasis: {
                        focus: 'series'
                    },
                    data: [150, 232, 201, 154, 190]
                },
            ],
        },

        option && myChart.setOption(option);
</script>

</html>